This is the analysis script to prepare the data to run analyses for the project “Anxiety, depression and trauma symptom change during the COVID-19 pandemic: retrospective versus objective assessment” - Young et al (2020)

Script written by K Purves, K Thompson, C Huebel and M Davies. Email: , , ,

#Set up

Clear global environment

Retrieve the current date to use it for file endings to not overwrite files when one exports files

#Packages Install packages (if they are not available in your version of R)

Load packages

Registered S3 method overwritten by 'pryr':
  method      from
  print.bytes Rcpp
For best results, restart R session and update pander using devtools:: or remotes::install_github('rapporter/pander')

Attaching package: 'polycor'
The following object is masked from 'package:psych':

    polyserial
corrplot 0.84 loaded
── Attaching packages ─────────────────────────────────────── tidyverse 1.3.0 ──
✓ ggplot2 3.3.2     ✓ purrr   0.3.4
✓ tibble  3.0.4     ✓ dplyr   1.0.2
✓ tidyr   1.1.2     ✓ stringr 1.4.0
✓ readr   1.3.1     ✓ forcats 0.5.0
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
x ggplot2::%+%()   masks psych::%+%()
x ggplot2::alpha() masks psych::alpha()
x dplyr::filter()  masks stats::filter()
x dplyr::lag()     masks stats::lag()
x tibble::view()   masks summarytools::view()

Colour palettes

Define colours for plotting this are the standard coping colours

Choose in this chunk which palette to use 04.07.2020 - Default to 2 colour COPING palette

ggplot theme

Set up ggplot theme for the plots

Data import

Source data file paths

Read in data

[1] 65223   642

Important vectors with collections of columns

Vectors for sum_score

 [1] "gad.sum_score_prepan"        "pcl.sum_score_prepan"       
 [3] "phq.sum_score_prepan"        "phq.sum_score_8items_prepan"
 [5] "ocir.sum_score_prepan"       "gad.sum_score_base"         
 [7] "gad.sum_score_retro"         "pcl.sum_score_base"         
 [9] "pcl.sum_score_retro"         "phq.sum_score_base"         
[11] "phq.sum_score_8items_base"   "phq.sum_score_retro"        
[13] "phq.sum_score_8items_retro"  "ocir.sum_score_base"        
[15] "ocir.sum_score_retro"       
[1] "phq.sum_score_prepan" "phq.sum_score_base"   "phq.sum_score_retro" 
[1] "gad.sum_score_prepan" "gad.sum_score_base"   "gad.sum_score_retro" 
[1] "ocir.sum_score_prepan" "ocir.sum_score_base"   "ocir.sum_score_retro" 
[1] "pcl.sum_score_prepan" "pcl.sum_score_base"   "pcl.sum_score_retro" 

Vectors for diff_score

 [1] "phq.diff_score_retro_prepan"  "phq.diff_score_base_prepan"  
 [3] "phq.diff_score_base_retro"    "gad.diff_score_retro_prepan" 
 [5] "gad.diff_score_base_prepan"   "gad.diff_score_base_retro"   
 [7] "pcl.diff_score_base_prepan"   "ocir.diff_score_retro_prepan"
 [9] "ocir.diff_score_base_prepan"  "ocir.diff_score_base_retro"  
[1] "phq.diff_score_retro_prepan" "phq.diff_score_base_prepan" 
[3] "phq.diff_score_base_retro"  
[1] "gad.diff_score_retro_prepan" "gad.diff_score_base_prepan" 
[3] "gad.diff_score_base_retro"  
[1] "ocir.diff_score_retro_prepan" "ocir.diff_score_base_prepan" 
[3] "ocir.diff_score_base_retro"  

Exclusions

Exclude GLAD/EDGI individuals that didn’t take part in COPING Exclude individuals with NA for the MHD categories Individuals with NAs for age/gender have already been excluded in pre-processing script, but they get excluded here to be safe and to double check previous programming.

[1] 65223   642
[1] 32970   642
[1] 32253

frequencies and descriptives in exclusion data

pandemic change gad

Frequencies  
dat$gad.pandemic_felt_feelings  
Type: Factor  

                         Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
--------------------- ------- --------- -------------- --------- --------------
           Much worse    5397     16.40          16.40     16.37          16.37
       A little worse   12150     36.91          53.31     36.85          53.22
         No different   13200     40.10          93.41     40.04          93.26
      A little better    1481      4.50          97.91      4.49          97.75
          Much better     689      2.09         100.00      2.09          99.84
                 <NA>      53                               0.16         100.00
                Total   32970    100.00         100.00    100.00         100.00

pandemic change phq

Frequencies  
dat$phq.pandemic_felt_feelings  
Type: Factor  

                         Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
--------------------- ------- --------- -------------- --------- --------------
           Much worse    5182     15.79          15.79     15.72          15.72
       A little worse   13087     39.87          55.66     39.69          55.41
         No different   12083     36.81          92.48     36.65          92.06
      A little better    1692      5.16          97.63      5.13          97.19
          Much better     777      2.37         100.00      2.36          99.55
                 <NA>     149                               0.45         100.00
                Total   32970    100.00         100.00    100.00         100.00

Ethnicity

Frequencies  
dat$Ethnicity_collapsed  
Type: Factor  

                                          Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
-------------------------------------- ------- --------- -------------- --------- --------------
                              European   28789     95.85          95.85     87.32          87.32
      Mixed or multiple ethnic origins     538      1.79          97.64      1.63          88.95
                Asian or Asian British     380      1.27          98.90      1.15          90.10
            African or African British     156      0.52          99.42      0.47          90.58
                                 Other     173      0.58         100.00      0.52          91.10
                                  <NA>    2934                               8.90         100.00
                                 Total   32970    100.00         100.00    100.00         100.00

Gender

Frequencies  
dat$Gender_collapsed  
Type: Factor  

                                 Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
----------------------------- ------- --------- -------------- --------- --------------
                         Male    9345     28.34          28.34     28.34          28.34
                       Female   23270     70.58          98.92     70.58          98.92
      Non-binary/Self-defined     355      1.08         100.00      1.08         100.00
                         <NA>       0                               0.00         100.00
                        Total   32970    100.00         100.00    100.00         100.00

age categorical

Frequencies  
dat$age_category_collapsed  
Type: Factor  

               Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
----------- ------- --------- -------------- --------- --------------
      16-18    1008      3.06           3.06      3.06           3.06
      19-25    2492      7.56          10.62      7.56          10.62
      26-35    4863     14.75          25.37     14.75          25.37
      36-45    4536     13.76          39.12     13.76          39.12
      46-55    6687     20.28          59.41     20.28          59.41
      56-65    7716     23.40          82.81     23.40          82.81
      66-70    3068      9.31          92.11      9.31          92.11
      71-75    1938      5.88          97.99      5.88          97.99
        76+     662      2.01         100.00      2.01         100.00
       <NA>       0                               0.00         100.00
      Total   32970    100.00         100.00    100.00         100.00

anxiety disorders

Frequencies  
dat$anxiety_disorders  
Type: Factor  

                             Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
------------------------- ------- --------- -------------- --------- --------------
      No anxiety disorder   16929     53.10          53.10     51.35          51.35
         Anxiety disorder   14955     46.90         100.00     45.36          96.71
                     <NA>    1086                               3.29         100.00
                    Total   32970    100.00         100.00    100.00         100.00

Depressive disorders

Frequencies  
dat$depressive_disorders  
Type: Factor  

                                Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
---------------------------- ------- --------- -------------- --------- --------------
      No depressive disorder   15045     47.19          47.19     45.63          45.63
         Depressive disorder   16839     52.81         100.00     51.07          96.71
                        <NA>    1086                               3.29         100.00
                       Total   32970    100.00         100.00    100.00         100.00

Depression and anxiety

Frequencies  
dat$depression_and_anxiety  
Type: Factor  

                                           Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
--------------------------------------- ------- --------- -------------- --------- --------------
      No depressive or anxiety disorder   12823     40.22          40.22     38.89          38.89
        Depressive and anxiety disorder   12733     39.94          80.15     38.62          77.51
               Only depressive disorder    4106     12.88          93.03     12.45          89.97
                  Only anxiety disorder    2222      6.97         100.00      6.74          96.71
                                   <NA>    1086                               3.29         100.00
                                  Total   32970    100.00         100.00    100.00         100.00

Eating disorders

Frequencies  
dat$eating_disorders  
Type: Factor  

                            Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
------------------------ ------- --------- -------------- --------- --------------
      No eating disorder   29830     93.56          93.56     90.48          90.48
         Eating disorder    2054      6.44         100.00      6.23          96.71
                    <NA>    1086                               3.29         100.00
                   Total   32970    100.00         100.00    100.00         100.00

OCD

Frequencies  
dat$obsessive_compulsive_disorders  
Type: Factor  

                                          Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
-------------------------------------- ------- --------- -------------- --------- --------------
      No obsessive compulsive disorder   29573     92.75          92.75     89.70          89.70
         Obsessive compulsive disorder    2311      7.25         100.00      7.01          96.71
                                  <NA>    1086                               3.29         100.00
                                 Total   32970    100.00         100.00    100.00         100.00

Psychosis

Frequencies  
dat$psychotic_disorders  
Type: Factor  

                               Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
--------------------------- ------- --------- -------------- --------- --------------
      No psychotic disorder   31308     98.19          98.19     94.96          94.96
         Psychotic disorder     576      1.81         100.00      1.75          96.71
                       <NA>    1086                               3.29         100.00
                      Total   32970    100.00         100.00    100.00         100.00

Bipolar

Frequencies  
dat$mhd.mania_hypomania_bipolar_or_manicdepression  
Type: Factor  

                                                           Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
------------------------------------------------------- ------- --------- -------------- --------- --------------
      Not Mania, hypomania, bipolar or manic-depression   30769     96.50          96.50     93.32          93.32
          Mania, hypomania, bipolar or manic-depression    1115      3.50         100.00      3.38          96.71
                                                   <NA>    1086                               3.29         100.00
                                                  Total   32970    100.00         100.00    100.00         100.00

PTSD

Frequencies  
dat$mhd.posttraumatic_stress_disorder_ptsd  
Type: Factor  

                                                   Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
----------------------------------------------- ------- --------- -------------- --------- --------------
      Not Post-traumatic stress disorder (PTSD)   29210     91.61          91.61     88.60          88.60
          Post-traumatic stress disorder (PTSD)    2674      8.39         100.00      8.11          96.71
                                           <NA>    1086                               3.29         100.00
                                          Total   32970    100.00         100.00    100.00         100.00

ASD

Frequencies  
dat$autism_spectrum_disorder  
Type: Factor  

                                     Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
--------------------------------- ------- --------- -------------- --------- --------------
      No autism spectrum disorder   31280     98.11          98.11     94.87          94.87
         Autism spectrum disorder     604      1.89         100.00      1.83          96.71
                             <NA>    1086                               3.29         100.00
                            Total   32970    100.00         100.00    100.00         100.00

ADHD

Frequencies  
dat$mhd.attention_deficit_hyperactivity_disorder  
Type: Factor  

                                                                                          Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
-------------------------------------------------------------------------------------- ------- --------- -------------- --------- --------------
      Not Attention deficit or attention deficit and hyperactivity disorder (ADD/ADHD)   31545     98.94          98.94     95.68          95.68
          Attention deficit or attention deficit and hyperactivity disorder (ADD/ADHD)     339      1.06         100.00      1.03          96.71
                                                                                  <NA>    1086                               3.29         100.00
                                                                                 Total   32970    100.00         100.00    100.00         100.00

Personality disorders

Frequencies  
dat$mhd.personality_disorder  
Type: Factor  

                                  Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
------------------------------ ------- --------- -------------- --------- --------------
      Not Personality disorder   30596     95.96          95.96     92.80          92.80
          Personality disorder    1288      4.04         100.00      3.91          96.71
                          <NA>    1086                               3.29         100.00
                         Total   32970    100.00         100.00    100.00         100.00

Controls

Frequencies  
dat$control  
Type: Factor  

                    Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
---------------- ------- --------- -------------- --------- --------------
      No control   19959     62.60          62.60     60.54          60.54
         Control   11925     37.40         100.00     36.17          96.71
            <NA>    1086                               3.29         100.00
           Total   32970    100.00         100.00    100.00         100.00

Data availability per questionnaire GAD, PHQ, PCL, and OCI-R

++MD: These ‘data availability’ chunks caused my R to crash, so I’m hashing them out for now. Others can test if it works for them and unhash as needed, otherwise I think they should be removed.

Data availability GAD

Data availability PHQ

Data availability PCL

Data availability OCI-R

Whole sample

Participants per Sample

Eating Disorders Genetics Initative Genetic Links to Anxiety and Depression National BioResource Rapid Assessment of MP

Frequencies  
dat$Sample  
Type: Character  

               Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
----------- ------- --------- -------------- --------- --------------
       EDGI      65      0.20           0.20      0.20           0.20
       GLAD   11723     35.56          35.75     35.56          35.75
        NBR   13029     39.52          75.27     39.52          75.27
       RAMP    8153     24.73         100.00     24.73         100.00
       <NA>       0                               0.00         100.00
      Total   32970    100.00         100.00    100.00         100.00

Psychiatric disorders

Frequencies  
dat$disorders_total_count  
Type: Numeric  

               Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
----------- ------- --------- -------------- --------- --------------
          0   12386     38.85          38.85     37.57          37.57
          1    5527     17.33          56.18     16.76          54.33
          2    8340     26.16          82.34     25.30          79.63
          3    3337     10.47          92.81     10.12          89.75
          4    1393      4.37          97.17      4.23          93.97
          5     569      1.78          98.96      1.73          95.70
          6     239      0.75          99.71      0.72          96.42
          7      64      0.20          99.91      0.19          96.62
          8      23      0.07          99.98      0.07          96.69
          9       6      0.02         100.00      0.02          96.71
       <NA>    1086                               3.29         100.00
      Total   32970    100.00         100.00    100.00         100.00

#HR

#SB - Impute no change prepandemic scores

 [1] 21 11 16 10  1  4 13 14 11  0  9 16  8  7 14 14  4  5  9  9 21 19  4  7  7
[26] 14 17 18 13 21
 [1] NA  2  9  5 NA 21 NA NA  3 NA  3 NA  3  3 13 NA  3  0 NA  5 15 17 NA  2  4
[26]  4 15  7  4 18
 [1] No different   Much worse     A little worse A little worse No different  
 [6] Much better    No different   No different   A little worse No different  
5 Levels: Much worse A little worse No different ... Much better
 [1] 3 1 2 2 3 5 3 3 2 3
 [1] 21 11 16 10  1  4 13 14 11  0  9 16  8  7 14 14  4  5  9  9 21 19  4  7  7
[26] 14 17 18 13 21
 [1] 21  2  9  5  1 21 13 14  3  0  3 16  3  3 13 14  3  0  9  5 15 17  4  2  4
[26]  4 15  7  4 18
 [1] 22  9 15 11  0  9 23 23 11  1 20 18 15  4 11 15 12 10 17 11 24 27  6  3  3
[26]  8 13 21  8 26
 [1] 23  1  7  7 NA 20 18 23  5 NA  3 NA  7  3 11 NA 12  2 NA  6 19 27 NA  1 NA
[26]  3 14  9  5 21
 [1] A little worse  Much worse      A little worse  A little worse 
 [5] No different    A little better A little worse  A little worse 
 [9] A little worse  No different   
5 Levels: Much worse A little worse No different ... Much better
 [1] 2 1 2 2 3 4 2 2 2 3
 [1] 22  9 15 11  0  9 23 23 11  1 20 18 15  4 11 15 12 10 17 11 24 27  6  3  3
[26]  8 13 21  8 26
 [1] 23  1  7  7  0 20 18 23  5  1  3 18  7  3 11 15 12  2 17  6 19 27  6  1  3
[26]  3 14  9  5 21

#Baseline survey completion (N per month)

 [1] "2020-04-30 20:51:40 UTC" "2020-04-30 18:55:12 UTC"
 [3] "2020-04-30 19:02:04 UTC" "2020-04-30 18:59:37 UTC"
 [5] "2020-05-01 10:02:34 UTC" "2020-04-30 22:16:01 UTC"
 [7] "2020-04-30 20:36:37 UTC" "2020-04-30 18:57:33 UTC"
 [9] "2020-05-01 08:54:01 UTC" "2020-04-30 21:47:03 UTC"
[11] "2020-04-30 19:10:42 UTC" "2020-04-30 19:29:36 UTC"
[13] "2020-04-30 19:20:42 UTC" "2020-05-01 15:09:23 UTC"
[15] "2020-04-30 18:59:55 UTC" "2020-05-04 16:40:21 UTC"
[17] "2020-05-19 10:34:16 UTC" "2020-04-30 19:11:26 UTC"
[19] "2020-05-01 05:04:57 UTC" "2020-04-30 19:18:30 UTC"

Vector

Correlation matrix

Warning in polychor(x, y, ML = ML, std.err = std.err): inadmissible correlation
set to -0.9999

Warning in polychor(x, y, ML = ML, std.err = std.err): inadmissible correlation
set to -0.9999
Warning in hetcor.data.frame(as.data.frame(dat[, mhd.items]), use =
"pairwise.complete.obs"): the correlation matrix has been adjusted to make it
positive-definite

Two-Step Estimates

Correlations/Type of Correlation:
                                               depressive_disorders
depressive_disorders                                              1
anxiety_disorders                                            0.8438
eating_disorders                                              0.541
obsessive_compulsive_disorders                               0.5429
psychotic_disorders                                          0.5074
mhd.mania_hypomania_bipolar_or_manicdepression               0.5528
mhd.posttraumatic_stress_disorder_ptsd                       0.6016
autism_spectrum_disorder                                     0.4022
mhd.attention_deficit_hyperactivity_disorder                 0.3752
mhd.personality_disorder                                     0.6441
control                                                     -0.8188
                                               anxiety_disorders
depressive_disorders                                  Polychoric
anxiety_disorders                                              1
eating_disorders                                          0.4988
obsessive_compulsive_disorders                             0.638
psychotic_disorders                                       0.4571
mhd.mania_hypomania_bipolar_or_manicdepression             0.434
mhd.posttraumatic_stress_disorder_ptsd                    0.5921
autism_spectrum_disorder                                  0.4387
mhd.attention_deficit_hyperactivity_disorder              0.4146
mhd.personality_disorder                                  0.5841
control                                                  -0.8066
                                               eating_disorders
depressive_disorders                                 Polychoric
anxiety_disorders                                    Polychoric
eating_disorders                                              1
obsessive_compulsive_disorders                           0.5734
psychotic_disorders                                      0.3664
mhd.mania_hypomania_bipolar_or_manicdepression           0.3778
mhd.posttraumatic_stress_disorder_ptsd                    0.391
autism_spectrum_disorder                                 0.3061
mhd.attention_deficit_hyperactivity_disorder             0.3366
mhd.personality_disorder                                 0.5257
control                                                 -0.6923
                                               obsessive_compulsive_disorders
depressive_disorders                                               Polychoric
anxiety_disorders                                                  Polychoric
eating_disorders                                                   Polychoric
obsessive_compulsive_disorders                                              1
psychotic_disorders                                                    0.3923
mhd.mania_hypomania_bipolar_or_manicdepression                         0.3995
mhd.posttraumatic_stress_disorder_ptsd                                 0.4531
autism_spectrum_disorder                                               0.4012
mhd.attention_deficit_hyperactivity_disorder                            0.393
mhd.personality_disorder                                               0.5019
control                                                               -0.7356
                                               psychotic_disorders
depressive_disorders                                    Polychoric
anxiety_disorders                                       Polychoric
eating_disorders                                        Polychoric
obsessive_compulsive_disorders                          Polychoric
psychotic_disorders                                              1
mhd.mania_hypomania_bipolar_or_manicdepression              0.7099
mhd.posttraumatic_stress_disorder_ptsd                       0.451
autism_spectrum_disorder                                    0.2978
mhd.attention_deficit_hyperactivity_disorder                0.3434
mhd.personality_disorder                                     0.609
control                                                    -0.7027
                                               mhd.mania_hypomania_bipolar_or_manicdepression
depressive_disorders                                                               Polychoric
anxiety_disorders                                                                  Polychoric
eating_disorders                                                                   Polychoric
obsessive_compulsive_disorders                                                     Polychoric
psychotic_disorders                                                                Polychoric
mhd.mania_hypomania_bipolar_or_manicdepression                                              1
mhd.posttraumatic_stress_disorder_ptsd                                                 0.3617
autism_spectrum_disorder                                                               0.2819
mhd.attention_deficit_hyperactivity_disorder                                           0.3528
mhd.personality_disorder                                                               0.5878
control                                                                               -0.6942
                                               mhd.posttraumatic_stress_disorder_ptsd
depressive_disorders                                                       Polychoric
anxiety_disorders                                                          Polychoric
eating_disorders                                                           Polychoric
obsessive_compulsive_disorders                                             Polychoric
psychotic_disorders                                                        Polychoric
mhd.mania_hypomania_bipolar_or_manicdepression                             Polychoric
mhd.posttraumatic_stress_disorder_ptsd                                              1
autism_spectrum_disorder                                                       0.2977
mhd.attention_deficit_hyperactivity_disorder                                   0.2873
mhd.personality_disorder                                                       0.5137
control                                                                       -0.6917
                                               autism_spectrum_disorder
depressive_disorders                                         Polychoric
anxiety_disorders                                            Polychoric
eating_disorders                                             Polychoric
obsessive_compulsive_disorders                               Polychoric
psychotic_disorders                                          Polychoric
mhd.mania_hypomania_bipolar_or_manicdepression               Polychoric
mhd.posttraumatic_stress_disorder_ptsd                       Polychoric
autism_spectrum_disorder                                              1
mhd.attention_deficit_hyperactivity_disorder                     0.5708
mhd.personality_disorder                                          0.372
control                                                         -0.6338
                                               mhd.attention_deficit_hyperactivity_disorder
depressive_disorders                                                             Polychoric
anxiety_disorders                                                                Polychoric
eating_disorders                                                                 Polychoric
obsessive_compulsive_disorders                                                   Polychoric
psychotic_disorders                                                              Polychoric
mhd.mania_hypomania_bipolar_or_manicdepression                                   Polychoric
mhd.posttraumatic_stress_disorder_ptsd                                           Polychoric
autism_spectrum_disorder                                                         Polychoric
mhd.attention_deficit_hyperactivity_disorder                                              1
mhd.personality_disorder                                                             0.3697
control                                                                             -0.6369
                                               mhd.personality_disorder
depressive_disorders                                         Polychoric
anxiety_disorders                                            Polychoric
eating_disorders                                             Polychoric
obsessive_compulsive_disorders                               Polychoric
psychotic_disorders                                          Polychoric
mhd.mania_hypomania_bipolar_or_manicdepression               Polychoric
mhd.posttraumatic_stress_disorder_ptsd                       Polychoric
autism_spectrum_disorder                                     Polychoric
mhd.attention_deficit_hyperactivity_disorder                 Polychoric
mhd.personality_disorder                                              1
control                                                         -0.7724
                                                  control
depressive_disorders                           Polychoric
anxiety_disorders                              Polychoric
eating_disorders                               Polychoric
obsessive_compulsive_disorders                 Polychoric
psychotic_disorders                            Polychoric
mhd.mania_hypomania_bipolar_or_manicdepression Polychoric
mhd.posttraumatic_stress_disorder_ptsd         Polychoric
autism_spectrum_disorder                       Polychoric
mhd.attention_deficit_hyperactivity_disorder   Polychoric
mhd.personality_disorder                       Polychoric
control                                                 1

Standard Errors/Numbers of Observations:
                                               depressive_disorders
depressive_disorders                                          31884
anxiety_disorders                                           0.00397
eating_disorders                                            0.01231
obsessive_compulsive_disorders                               0.0117
psychotic_disorders                                         0.02145
mhd.mania_hypomania_bipolar_or_manicdepression              0.01593
mhd.posttraumatic_stress_disorder_ptsd                      0.01074
autism_spectrum_disorder                                     0.0207
mhd.attention_deficit_hyperactivity_disorder                0.02626
mhd.personality_disorder                                    0.01499
control                                                         Inf
                                               anxiety_disorders
depressive_disorders                                       31884
anxiety_disorders                                          31884
eating_disorders                                         0.01209
obsessive_compulsive_disorders                           0.01057
psychotic_disorders                                       0.0202
mhd.mania_hypomania_bipolar_or_manicdepression           0.01556
mhd.posttraumatic_stress_disorder_ptsd                   0.01035
autism_spectrum_disorder                                 0.01985
mhd.attention_deficit_hyperactivity_disorder             0.02525
mhd.personality_disorder                                 0.01397
control                                                      Inf
                                               eating_disorders
depressive_disorders                                      31884
anxiety_disorders                                         31884
eating_disorders                                          31884
obsessive_compulsive_disorders                           0.0131
psychotic_disorders                                     0.02401
mhd.mania_hypomania_bipolar_or_manicdepression           0.0196
mhd.posttraumatic_stress_disorder_ptsd                  0.01554
autism_spectrum_disorder                                0.02537
mhd.attention_deficit_hyperactivity_disorder            0.02953
mhd.personality_disorder                                0.01583
control                                                   12.43
                                               obsessive_compulsive_disorders
depressive_disorders                                                    31884
anxiety_disorders                                                       31884
eating_disorders                                                        31884
obsessive_compulsive_disorders                                          31884
psychotic_disorders                                                   0.02268
mhd.mania_hypomania_bipolar_or_manicdepression                        0.01856
mhd.posttraumatic_stress_disorder_ptsd                                0.01415
autism_spectrum_disorder                                              0.02237
mhd.attention_deficit_hyperactivity_disorder                          0.02703
mhd.personality_disorder                                              0.01581
control                                                                 1.765
                                               psychotic_disorders
depressive_disorders                                         31884
anxiety_disorders                                            31884
eating_disorders                                             31884
obsessive_compulsive_disorders                               31884
psychotic_disorders                                          31884
mhd.mania_hypomania_bipolar_or_manicdepression             0.01643
mhd.posttraumatic_stress_disorder_ptsd                     0.02092
autism_spectrum_disorder                                   0.03539
mhd.attention_deficit_hyperactivity_disorder               0.03937
mhd.personality_disorder                                   0.01899
control                                                      3.349
                                               mhd.mania_hypomania_bipolar_or_manicdepression
depressive_disorders                                                                    31884
anxiety_disorders                                                                       31884
eating_disorders                                                                        31884
obsessive_compulsive_disorders                                                          31884
psychotic_disorders                                                                     31884
mhd.mania_hypomania_bipolar_or_manicdepression                                          31884
mhd.posttraumatic_stress_disorder_ptsd                                                0.01876
autism_spectrum_disorder                                                               0.0301
mhd.attention_deficit_hyperactivity_disorder                                          0.03306
mhd.personality_disorder                                                              0.01659
control                                                                                 1.998
                                               mhd.posttraumatic_stress_disorder_ptsd
depressive_disorders                                                            31884
anxiety_disorders                                                               31884
eating_disorders                                                                31884
obsessive_compulsive_disorders                                                  31884
psychotic_disorders                                                             31884
mhd.mania_hypomania_bipolar_or_manicdepression                                  31884
mhd.posttraumatic_stress_disorder_ptsd                                          31884
autism_spectrum_disorder                                                      0.02409
mhd.attention_deficit_hyperactivity_disorder                                  0.02932
mhd.personality_disorder                                                      0.01524
control                                                                         1.737
                                               autism_spectrum_disorder
depressive_disorders                                              31884
anxiety_disorders                                                 31884
eating_disorders                                                  31884
obsessive_compulsive_disorders                                    31884
psychotic_disorders                                               31884
mhd.mania_hypomania_bipolar_or_manicdepression                    31884
mhd.posttraumatic_stress_disorder_ptsd                            31884
autism_spectrum_disorder                                          31884
mhd.attention_deficit_hyperactivity_disorder                    0.02851
mhd.personality_disorder                                        0.02595
control                                                           3.405
                                               mhd.attention_deficit_hyperactivity_disorder
depressive_disorders                                                                  31884
anxiety_disorders                                                                     31884
eating_disorders                                                                      31884
obsessive_compulsive_disorders                                                        31884
psychotic_disorders                                                                   31884
mhd.mania_hypomania_bipolar_or_manicdepression                                        31884
mhd.posttraumatic_stress_disorder_ptsd                                                31884
autism_spectrum_disorder                                                              31884
mhd.attention_deficit_hyperactivity_disorder                                          31884
mhd.personality_disorder                                                            0.03093
control                                                                               1.723
                                               mhd.personality_disorder control
depressive_disorders                                              31884   31884
anxiety_disorders                                                 31884   31884
eating_disorders                                                  31884   31884
obsessive_compulsive_disorders                                    31884   31884
psychotic_disorders                                               31884   31884
mhd.mania_hypomania_bipolar_or_manicdepression                    31884   31884
mhd.posttraumatic_stress_disorder_ptsd                            31884   31884
autism_spectrum_disorder                                          31884   31884
mhd.attention_deficit_hyperactivity_disorder                      31884   31884
mhd.personality_disorder                                          31884   31884
control                                                           1.736   31884

Create the correlation matrix plot using the corrplot package

#Correlations of retro impute and prepan ##Create function to use for all of the corplots

###Whole sample prepan retro correlation

Frequencies  
prepan_retro_dat$Sample  
Type: Character  

               Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
----------- ------- --------- -------------- --------- --------------
       EDGI      65      0.55           0.55      0.55           0.55
       GLAD   11723     99.45         100.00     99.45         100.00
       <NA>       0                               0.00         100.00
      Total   11788    100.00         100.00    100.00         100.00

Two-Step Estimates

Correlations/Type of Correlation:
                     gad.sum_score_prepan gad.sum_score_retro
gad.sum_score_prepan                    1             Pearson
gad.sum_score_retro                0.5088                   1
phq.sum_score_prepan               0.6904              0.4475
phq.sum_score_retro                0.4451              0.7464
                     phq.sum_score_prepan phq.sum_score_retro
gad.sum_score_prepan              Pearson             Pearson
gad.sum_score_retro               Pearson             Pearson
phq.sum_score_prepan                    1             Pearson
phq.sum_score_retro                0.5898                   1

Standard Errors/Numbers of Observations:
                     gad.sum_score_prepan gad.sum_score_retro
gad.sum_score_prepan                11763                8447
gad.sum_score_retro              0.008065                8465
phq.sum_score_prepan             0.004832            0.008704
phq.sum_score_retro              0.008568            0.005105
                     phq.sum_score_prepan phq.sum_score_retro
gad.sum_score_prepan                11737                8761
gad.sum_score_retro                  8444                7530
phq.sum_score_prepan                11756                8758
phq.sum_score_retro              0.006969                8780

P-values for Tests of Bivariate Normality:
                     gad.sum_score_prepan gad.sum_score_retro
gad.sum_score_prepan                                         
gad.sum_score_retro            6.356e-158                    
phq.sum_score_prepan           6.937e-175          4.192e-103
phq.sum_score_retro            2.829e-165           4.78e-131
                     phq.sum_score_prepan
gad.sum_score_prepan                     
gad.sum_score_retro                      
phq.sum_score_prepan                     
phq.sum_score_retro            6.359e-135
Warning in corCi(x = x, keys = keys, n.iter = n.iter, p = p, overlap = overlap, : 
Finding confidence intervals from a correlation matrix, but  n is not specified, arbitrarily set to 1000

Frequencies  
whole_retro_prepan_scatter$Sample  
Type: Character  

               Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
----------- ------- --------- -------------- --------- --------------
       EDGI      65      0.55           0.55      0.55           0.55
       GLAD   11723     99.45         100.00     99.45         100.00
       <NA>       0                               0.00         100.00
      Total   11788    100.00         100.00    100.00         100.00
Warning: Ignoring unknown parameters: w, h
`geom_smooth()` using formula 'y ~ x'
Warning: Removed 32 rows containing non-finite values (stat_smooth).
Warning: Removed 32 rows containing missing values (geom_point).

Warning: Removed 32 rows containing missing values (geom_point).

Warning: Ignoring unknown parameters: w, h
`geom_smooth()` using formula 'y ~ x'
Warning: Removed 38 rows containing non-finite values (stat_smooth).
Warning: Removed 38 rows containing missing values (geom_point).

Warning: Removed 38 rows containing missing values (geom_point).

###Little/much worse prepan retro correlation

[1] "gad.sum_score_prepan" "gad.sum_score_retro"  "phq.sum_score_prepan"
[4] "phq.sum_score_retro" 
Frequencies  
prepan_retro_dat_worse$Sample  
Type: Character  

              Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
----------- ------ --------- -------------- --------- --------------
       EDGI     42      0.58           0.58      0.58           0.58
       GLAD   7251     99.42         100.00     99.42         100.00
       <NA>      0                               0.00         100.00
      Total   7293    100.00         100.00    100.00         100.00

Two-Step Estimates

Correlations/Type of Correlation:
                     gad.sum_score_prepan gad.sum_score_retro
gad.sum_score_prepan                    1             Pearson
gad.sum_score_retro                0.5416                   1
phq.sum_score_prepan                 0.69              0.4788
phq.sum_score_retro                0.4587              0.7399
                     phq.sum_score_prepan phq.sum_score_retro
gad.sum_score_prepan              Pearson             Pearson
gad.sum_score_retro               Pearson             Pearson
phq.sum_score_prepan                    1             Pearson
phq.sum_score_retro                0.5991                   1

Standard Errors/Numbers of Observations:
                     gad.sum_score_prepan gad.sum_score_retro
gad.sum_score_prepan                 7277                7265
gad.sum_score_retro              0.008292                7281
phq.sum_score_prepan             0.006148            0.009045
phq.sum_score_retro              0.009793             0.00561
                     phq.sum_score_prepan phq.sum_score_retro
gad.sum_score_prepan                 7264                6503
gad.sum_score_retro                  7264                6508
phq.sum_score_prepan                 7276                6502
phq.sum_score_retro              0.007952                6517

P-values for Tests of Bivariate Normality:
                     gad.sum_score_prepan gad.sum_score_retro
gad.sum_score_prepan                                         
gad.sum_score_retro            6.086e-111                    
phq.sum_score_prepan            1.351e-94           7.876e-82
phq.sum_score_retro             1.097e-99           3.302e-87
                     phq.sum_score_prepan
gad.sum_score_prepan                     
gad.sum_score_retro                      
phq.sum_score_prepan                     
phq.sum_score_retro              1.43e-89
Warning in corCi(x = x, keys = keys, n.iter = n.iter, p = p, overlap = overlap, : 
Finding confidence intervals from a correlation matrix, but  n is not specified, arbitrarily set to 1000

Frequencies  
little_much_worse_retro_prepan$Sample  
Type: Character  

               Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
----------- ------- --------- -------------- --------- --------------
       EDGI      65      0.55           0.55      0.55           0.55
       GLAD   11723     99.45         100.00     99.45         100.00
       <NA>       0                               0.00         100.00
      Total   11788    100.00         100.00    100.00         100.00
Warning: Ignoring unknown parameters: w, h
`geom_smooth()` using formula 'y ~ x'
Warning: Removed 14 rows containing non-finite values (stat_smooth).
Warning: Removed 14 rows containing missing values (geom_point).

Warning: Removed 14 rows containing missing values (geom_point).

Warning: Ignoring unknown parameters: w, h
`geom_smooth()` using formula 'y ~ x'
Warning: Removed 14 rows containing non-finite values (stat_smooth).

Warning: Removed 14 rows containing missing values (geom_point).

Warning: Removed 14 rows containing missing values (geom_point).

Warning: Ignoring unknown parameters: w, h
`geom_smooth()` using formula 'y ~ x'
Warning: Removed 28 rows containing non-finite values (stat_smooth).
Warning: Removed 28 rows containing missing values (geom_point).

Warning: Removed 28 rows containing missing values (geom_point).

Warning: Ignoring unknown parameters: w, h
`geom_smooth()` using formula 'y ~ x'
Warning: Removed 11 rows containing non-finite values (stat_smooth).
Warning: Removed 11 rows containing missing values (geom_point).

Warning: Removed 11 rows containing missing values (geom_point).

Warning: Ignoring unknown parameters: w, h
`geom_smooth()` using formula 'y ~ x'
Warning: Removed 17 rows containing non-finite values (stat_smooth).
Warning: Removed 17 rows containing missing values (geom_point).

Warning: Removed 17 rows containing missing values (geom_point).

Warning: Ignoring unknown parameters: w, h
`geom_smooth()` using formula 'y ~ x'
Warning: Removed 28 rows containing non-finite values (stat_smooth).
Warning: Removed 28 rows containing missing values (geom_point).

Warning: Removed 28 rows containing missing values (geom_point).

###Little/much better prepan retro correlation

[1] "gad.sum_score_prepan" "gad.sum_score_retro"  "phq.sum_score_prepan"
[4] "phq.sum_score_retro" 
Frequencies  
prepan_retro_dat_better$Sample  
Type: Character  

              Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
----------- ------ --------- -------------- --------- --------------
       EDGI      7      0.59           0.59      0.59           0.59
       GLAD   1179     99.41         100.00     99.41         100.00
       <NA>      0                               0.00         100.00
      Total   1186    100.00         100.00    100.00         100.00

Two-Step Estimates

Correlations/Type of Correlation:
                     gad.sum_score_prepan gad.sum_score_retro
gad.sum_score_prepan                    1             Pearson
gad.sum_score_retro                0.4843                   1
phq.sum_score_prepan               0.6497              0.4105
phq.sum_score_retro                0.3582              0.6968
                     phq.sum_score_prepan phq.sum_score_retro
gad.sum_score_prepan              Pearson             Pearson
gad.sum_score_retro               Pearson             Pearson
phq.sum_score_prepan                    1             Pearson
phq.sum_score_retro                0.5402                   1

Standard Errors/Numbers of Observations:
                     gad.sum_score_prepan gad.sum_score_retro
gad.sum_score_prepan                 1184                1182
gad.sum_score_retro               0.02228                1184
phq.sum_score_prepan              0.01684             0.02422
phq.sum_score_retro                0.0273             0.01611
                     phq.sum_score_prepan phq.sum_score_retro
gad.sum_score_prepan                 1180                1021
gad.sum_score_retro                  1180                1022
phq.sum_score_prepan                 1182                1020
phq.sum_score_retro                0.0222                1023

P-values for Tests of Bivariate Normality:
                     gad.sum_score_prepan gad.sum_score_retro
gad.sum_score_prepan                                         
gad.sum_score_retro             6.824e-10                    
phq.sum_score_prepan            2.617e-12           4.074e-07
phq.sum_score_retro             7.608e-10           1.671e-07
                     phq.sum_score_prepan
gad.sum_score_prepan                     
gad.sum_score_retro                      
phq.sum_score_prepan                     
phq.sum_score_retro             6.461e-11
Warning in corCi(x = x, keys = keys, n.iter = n.iter, p = p, overlap = overlap, : 
Finding confidence intervals from a correlation matrix, but  n is not specified, arbitrarily set to 1000

Frequencies  
little_much_better_retro_prepan$Sample  
Type: Character  

               Freq   % Valid   % Valid Cum.   % Total   % Total Cum.
----------- ------- --------- -------------- --------- --------------
       EDGI      65      0.55           0.55      0.55           0.55
       GLAD   11723     99.45         100.00     99.45         100.00
       <NA>       0                               0.00         100.00
      Total   11788    100.00         100.00    100.00         100.00
Warning: Ignoring unknown parameters: w, h
`geom_smooth()` using formula 'y ~ x'
Warning: Removed 3 rows containing non-finite values (stat_smooth).
Warning: Removed 3 rows containing missing values (geom_point).

Warning: Removed 3 rows containing missing values (geom_point).

Warning: Ignoring unknown parameters: w, h
`geom_smooth()` using formula 'y ~ x'
Warning: Removed 1 rows containing non-finite values (stat_smooth).
Warning: Removed 1 rows containing missing values (geom_point).

Warning: Removed 1 rows containing missing values (geom_point).

Warning: Ignoring unknown parameters: w, h
`geom_smooth()` using formula 'y ~ x'
Warning: Removed 4 rows containing non-finite values (stat_smooth).
Warning: Removed 4 rows containing missing values (geom_point).

Warning: Removed 4 rows containing missing values (geom_point).

Warning: Ignoring unknown parameters: w, h
`geom_smooth()` using formula 'y ~ x'
Warning: Removed 4 rows containing non-finite values (stat_smooth).

Warning: Removed 4 rows containing missing values (geom_point).

Warning: Removed 4 rows containing missing values (geom_point).

Warning: Ignoring unknown parameters: w, h
`geom_smooth()` using formula 'y ~ x'
Warning: Removed 6 rows containing non-finite values (stat_smooth).
Warning: Removed 6 rows containing missing values (geom_point).

Warning: Removed 6 rows containing missing values (geom_point).

Warning: Ignoring unknown parameters: w, h
`geom_smooth()` using formula 'y ~ x'
Warning: Removed 10 rows containing non-finite values (stat_smooth).
Warning: Removed 10 rows containing missing values (geom_point).

Warning: Removed 10 rows containing missing values (geom_point).

Create long data frame

Disorders per Gender

Warning: Ignoring unknown parameters: binwidth

Warning: Ignoring unknown parameters: binwidth

100% bar per diagnosis with percentages of contribution per sample

Disorders per sample

Disorder_inc Sample n Prop
Anxiety disorders EDGI 38 0.00
Anxiety disorders GLAD 10089 0.67
Anxiety disorders NBR 1752 0.12
Anxiety disorders RAMP 3076 0.21
Depressive disorders EDGI 47 0.00
Depressive disorders GLAD 10607 0.63
Depressive disorders NBR 2733 0.16
Depressive disorders RAMP 3452 0.21
Eating disorders EDGI 61 0.03
Eating disorders GLAD 1320 0.64
Eating disorders NBR 191 0.09
Eating disorders RAMP 482 0.23
OCDs EDGI 18 0.01
OCDs GLAD 1585 0.69
OCDs NBR 142 0.06
OCDs RAMP 566 0.24
Psychotic disorders GLAD 387 0.67
Psychotic disorders NBR 37 0.06
Psychotic disorders RAMP 152 0.26
Bipolar disorders EDGI 3 0.00
Bipolar disorders GLAD 816 0.73
Bipolar disorders NBR 72 0.06
Bipolar disorders RAMP 224 0.20
PTSD EDGI 6 0.00
PTSD GLAD 1795 0.67
PTSD NBR 226 0.08
PTSD RAMP 647 0.24
Autism EDGI 6 0.01
Autism GLAD 362 0.60
Autism NBR 45 0.07
Autism RAMP 191 0.32
ADHD EDGI 2 0.01
ADHD GLAD 191 0.56
ADHD NBR 32 0.09
ADHD RAMP 114 0.34
Personality disorders EDGI 6 0.00
Personality disorders GLAD 911 0.71
Personality disorders NBR 76 0.06
Personality disorders RAMP 295 0.23
Controls EDGI 1 0.00
Controls GLAD 139 0.01
Controls NBR 9247 0.78
Controls RAMP 2538 0.21
Warning: Ignoring unknown parameters: binwidth

Disorder per ethnicity

Warning: Ignoring unknown parameters: binwidth

Age categories

Age bar plot for whole sample (not grouped) Summary dataset for age and display it as a bar plot

age_category n Prop order
16-18 1008 0.03 1
19-25 2492 0.08 2
26-35 4863 0.15 3
36-45 4536 0.14 4
46-55 6687 0.20 5
56-65 7716 0.23 6
66-70 3068 0.09 7
71-75 1938 0.06 8
76-80 518 0.02 9
81-85 107 0.00 10
86-90 26 0.00 11
91-100 6 0.00 12
100+ 5 0.00 13

Education

Pie charts

summary dataset with frequencies

highest_education n freq
GCSE/CSE 4083 0.12
NVQ 2092 0.06
A-levels 6506 0.20
University 18939 0.57

pie chart labels

Warning: Ignoring unknown parameters: face

Warning: Ignoring unknown parameters: face

Warning: Ignoring unknown aesthetics: face

pie chart - no labels

Ethnicity_collapsed

Pie charts

Ethnicity_collapsed n freq
European 28789 0.96
Mixed or multiple ethnic origins 538 0.02
Asian or Asian British 380 0.01
African or African British 156 0.01
Other 173 0.01

pie chart with only European label

Warning: Ignoring unknown parameters: face

Pie chart - no labels

Gender collapsed

Pie charts

Gender_collapsed n freq
Male 9345 0.28
Female 23270 0.71
Non-binary/Self-defined 355 0.01
Warning: Ignoring unknown parameters: face

Pie chart - only labelling two largest groups (male and female)

Warning: Ignoring unknown parameters: face

Pie chart - no labels

Compare the GLAD/EDGI and COPING subcohorts: EDGI, GLAD, NBR, RAMP

+++CH: Diagnosis, ethnicity, gender, age

age_category

Proportion tables

age_category Sample n Prop
16-18 EDGI 7 0.00
16-18 GLAD 330 0.01
16-18 NBR 10 0.00
16-18 RAMP 661 0.02
19-25 EDGI 17 0.00
19-25 GLAD 1445 0.04
19-25 NBR 295 0.01
19-25 RAMP 735 0.02
26-35 EDGI 21 0.00
26-35 GLAD 2667 0.08
26-35 NBR 1165 0.04
26-35 RAMP 1010 0.03
36-45 EDGI 8 0.00
36-45 GLAD 2264 0.07
36-45 NBR 1439 0.04
36-45 RAMP 825 0.03
46-55 EDGI 4 0.00
46-55 GLAD 2604 0.08
46-55 NBR 2637 0.08
46-55 RAMP 1442 0.04
56-65 EDGI 5 0.00
56-65 GLAD 1746 0.05
56-65 NBR 3900 0.12
56-65 RAMP 2065 0.06
66-70 EDGI 3 0.00
66-70 GLAD 398 0.01
66-70 NBR 1938 0.06
66-70 RAMP 729 0.02
71-75 GLAD 208 0.01
71-75 NBR 1244 0.04
71-75 RAMP 486 0.01
76-80 GLAD 50 0.00
76-80 NBR 326 0.01
76-80 RAMP 142 0.00
81-85 GLAD 10 0.00
81-85 NBR 58 0.00
81-85 RAMP 39 0.00
86-90 GLAD 1 0.00
86-90 NBR 12 0.00
86-90 RAMP 13 0.00
91-100 NBR 2 0.00
91-100 RAMP 4 0.00
100+ NBR 3 0.00
100+ RAMP 2 0.00
Sample age_category n Prop
EDGI 16-18 7 0.11
EDGI 19-25 17 0.26
EDGI 26-35 21 0.32
EDGI 36-45 8 0.12
EDGI 46-55 4 0.06
EDGI 56-65 5 0.08
EDGI 66-70 3 0.05
GLAD 16-18 330 0.03
GLAD 19-25 1445 0.12
GLAD 26-35 2667 0.23
GLAD 36-45 2264 0.19
GLAD 46-55 2604 0.22
GLAD 56-65 1746 0.15
GLAD 66-70 398 0.03
GLAD 71-75 208 0.02
GLAD 76-80 50 0.00
GLAD 81-85 10 0.00
GLAD 86-90 1 0.00
NBR 16-18 10 0.00
NBR 19-25 295 0.02
NBR 26-35 1165 0.09
NBR 36-45 1439 0.11
NBR 46-55 2637 0.20
NBR 56-65 3900 0.30
NBR 66-70 1938 0.15
NBR 71-75 1244 0.10
NBR 76-80 326 0.03
NBR 81-85 58 0.00
NBR 86-90 12 0.00
NBR 91-100 2 0.00
NBR 100+ 3 0.00
RAMP 16-18 661 0.08
RAMP 19-25 735 0.09
RAMP 26-35 1010 0.12
RAMP 36-45 825 0.10
RAMP 46-55 1442 0.18
RAMP 56-65 2065 0.25
RAMP 66-70 729 0.09
RAMP 71-75 486 0.06
RAMP 76-80 142 0.02
RAMP 81-85 39 0.00
RAMP 86-90 13 0.00
RAMP 91-100 4 0.00
RAMP 100+ 2 0.00

Cross tables

age_category n_EDGI n_GLAD n_NBR n_RAMP Prop_EDGI Prop_GLAD Prop_NBR Prop_RAMP
16-18 7 330 10 661 0.11 0.03 0.00 0.08
19-25 17 1445 295 735 0.26 0.12 0.02 0.09
26-35 21 2667 1165 1010 0.32 0.23 0.09 0.12
36-45 8 2264 1439 825 0.12 0.19 0.11 0.10
46-55 4 2604 2637 1442 0.06 0.22 0.20 0.18
56-65 5 1746 3900 2065 0.08 0.15 0.30 0.25
66-70 3 398 1938 729 0.05 0.03 0.15 0.09
71-75 NA 208 1244 486 NA 0.02 0.10 0.06
76-80 NA 50 326 142 NA 0.00 0.03 0.02
81-85 NA 10 58 39 NA 0.00 0.00 0.00
86-90 NA 1 12 13 NA 0.00 0.00 0.00
91-100 NA NA 2 4 NA NA 0.00 0.00
100+ NA NA 3 2 NA NA 0.00 0.00
age_category EDGI GLAD NBR RAMP
16-18 7 330 10 661
19-25 17 1445 295 735
26-35 21 2667 1165 1010
36-45 8 2264 1439 825
46-55 4 2604 2637 1442
56-65 5 1746 3900 2065
66-70 3 398 1938 729
71-75 0 208 1244 486
76-80 0 50 326 142
81-85 0 10 58 39
86-90 0 1 12 13
91-100 0 0 2 4
100+ 0 0 3 2

Chi square test

Warning in chisq.test(.): Chi-squared approximation may be incorrect
statistic p.value parameter method
5643 0 36 Pearson’s Chi-squared test
Warning: Ignoring unknown parameters: binwidth

Warning: Ignoring unknown parameters: binwidth

Ethnicity_collapsed

Proportion tables

Ethnicity_collapsed Sample n Prop
European EDGI 60 0.00
European GLAD 11214 0.34
European NBR 9868 0.30
European RAMP 7647 0.23
Mixed or multiple ethnic origins EDGI 3 0.00
Mixed or multiple ethnic origins GLAD 251 0.01
Mixed or multiple ethnic origins NBR 118 0.00
Mixed or multiple ethnic origins RAMP 166 0.01
Asian or Asian British EDGI 1 0.00
Asian or Asian British GLAD 89 0.00
Asian or Asian British NBR 126 0.00
Asian or Asian British RAMP 164 0.00
African or African British GLAD 34 0.00
African or African British NBR 46 0.00
African or African British RAMP 76 0.00
Other EDGI 1 0.00
Other GLAD 108 0.00
Other RAMP 64 0.00
NA GLAD 27 0.00
NA NBR 2871 0.09
NA RAMP 36 0.00
Sample Ethnicity_collapsed n Prop
EDGI European 60 0.92
EDGI Mixed or multiple ethnic origins 3 0.05
EDGI Asian or Asian British 1 0.02
EDGI Other 1 0.02
GLAD European 11214 0.96
GLAD Mixed or multiple ethnic origins 251 0.02
GLAD Asian or Asian British 89 0.01
GLAD African or African British 34 0.00
GLAD Other 108 0.01
GLAD NA 27 0.00
NBR European 9868 0.76
NBR Mixed or multiple ethnic origins 118 0.01
NBR Asian or Asian British 126 0.01
NBR African or African British 46 0.00
NBR NA 2871 0.22
RAMP European 7647 0.94
RAMP Mixed or multiple ethnic origins 166 0.02
RAMP Asian or Asian British 164 0.02
RAMP African or African British 76 0.01
RAMP Other 64 0.01
RAMP NA 36 0.00

Cross tables

Ethnicity_collapsed n_EDGI n_GLAD n_NBR n_RAMP Prop_EDGI Prop_GLAD Prop_NBR Prop_RAMP
European 60 11214 9868 7647 0.92 0.96 0.76 0.94
Mixed or multiple ethnic origins 3 251 118 166 0.05 0.02 0.01 0.02
Asian or Asian British 1 89 126 164 0.02 0.01 0.01 0.02
Other 1 108 NA 64 0.02 0.01 NA 0.01
African or African British NA 34 46 76 NA 0.00 0.00 0.01
NA NA 27 2871 36 NA 0.00 0.22 0.00
Ethnicity_collapsed EDGI GLAD NBR RAMP
European 60 11214 9868 7647
Mixed or multiple ethnic origins 3 251 118 166
Asian or Asian British 1 89 126 164
African or African British 0 34 46 76
Other 1 108 0 64
NA 0 27 2871 36

Chi square test

Warning in chisq.test(.): Chi-squared approximation may be incorrect
statistic p.value parameter method
4818.902 0 15 Pearson’s Chi-squared test
Warning: Ignoring unknown parameters: binwidth

Warning: Ignoring unknown parameters: binwidth

Gender_collapsed

Proportion tables

Gender_collapsed Sample n Prop
Male EDGI 1 0.00
Male GLAD 2032 0.06
Male NBR 5613 0.17
Male RAMP 1699 0.05
Female EDGI 62 0.00
Female GLAD 9460 0.29
Female NBR 7379 0.22
Female RAMP 6369 0.19
Non-binary/Self-defined EDGI 2 0.00
Non-binary/Self-defined GLAD 231 0.01
Non-binary/Self-defined NBR 37 0.00
Non-binary/Self-defined RAMP 85 0.00
Sample Gender_collapsed n Prop
EDGI Male 1 0.02
EDGI Female 62 0.95
EDGI Non-binary/Self-defined 2 0.03
GLAD Male 2032 0.17
GLAD Female 9460 0.81
GLAD Non-binary/Self-defined 231 0.02
NBR Male 5613 0.43
NBR Female 7379 0.57
NBR Non-binary/Self-defined 37 0.00
RAMP Male 1699 0.21
RAMP Female 6369 0.78
RAMP Non-binary/Self-defined 85 0.01

Cross tables

Gender_collapsed n_EDGI n_GLAD n_NBR n_RAMP Prop_EDGI Prop_GLAD Prop_NBR Prop_RAMP
Male 1 2032 5613 1699 0.02 0.17 0.43 0.21
Female 62 9460 7379 6369 0.95 0.81 0.57 0.78
Non-binary/Self-defined 2 231 37 85 0.03 0.02 0.00 0.01
Gender_collapsed EDGI GLAD NBR RAMP
Male 1 2032 5613 1699
Female 62 9460 7379 6369
Non-binary/Self-defined 2 231 37 85

Chi square test

Warning in chisq.test(.): Chi-squared approximation may be incorrect
statistic p.value parameter method
2443.979 0 6 Pearson’s Chi-squared test
Warning: Ignoring unknown parameters: binwidth

Warning: Ignoring unknown parameters: binwidth

highest_education

Proportion tables

highest_education Sample n Prop
GCSE/CSE EDGI 7 0.00
GCSE/CSE GLAD 1024 0.03
GCSE/CSE NBR 1861 0.06
GCSE/CSE RAMP 1191 0.04
NVQ EDGI 3 0.00
NVQ GLAD 868 0.03
NVQ NBR 1221 0.04
A-levels EDGI 20 0.00
A-levels GLAD 2571 0.08
A-levels NBR 2310 0.07
A-levels RAMP 1605 0.05
University EDGI 35 0.00
University GLAD 6854 0.22
University NBR 6956 0.22
University RAMP 5094 0.16
Sample highest_education n Prop
EDGI GCSE/CSE 7 0.11
EDGI NVQ 3 0.05
EDGI A-levels 20 0.31
EDGI University 35 0.54
GLAD GCSE/CSE 1024 0.09
GLAD NVQ 868 0.08
GLAD A-levels 2571 0.23
GLAD University 6854 0.61
NBR GCSE/CSE 1861 0.15
NBR NVQ 1221 0.10
NBR A-levels 2310 0.19
NBR University 6956 0.56
RAMP GCSE/CSE 1191 0.15
RAMP A-levels 1605 0.20
RAMP University 5094 0.65

Cross tables

highest_education n_EDGI n_GLAD n_NBR n_RAMP Prop_EDGI Prop_GLAD Prop_NBR Prop_RAMP
GCSE/CSE 7 1024 1861 1191 0.11 0.09 0.15 0.15
NVQ 3 868 1221 NA 0.05 0.08 0.10 NA
A-levels 20 2571 2310 1605 0.31 0.23 0.19 0.20
University 35 6854 6956 5094 0.54 0.61 0.56 0.65
highest_education EDGI GLAD NBR RAMP
GCSE/CSE 7 1024 1861 1191
NVQ 3 868 1221 0
A-levels 20 2571 2310 1605
University 35 6854 6956 5094

Chi square test

Warning in chisq.test(.): Chi-squared approximation may be incorrect
statistic p.value parameter method
1127.81 0 12 Pearson’s Chi-squared test

Bar plots

Warning: Ignoring unknown parameters: binwidth

Warning: Ignoring unknown parameters: binwidth

key_worker

Proportion tables

key_worker Sample n Prop
No key worker EDGI 42 0.00
No key worker GLAD 6707 0.20
No key worker NBR 8610 0.26
No key worker RAMP 5500 0.17
Key worker EDGI 23 0.00
Key worker GLAD 4979 0.15
Key worker NBR 4399 0.13
Key worker RAMP 2609 0.08
NA GLAD 37 0.00
NA NBR 20 0.00
NA RAMP 44 0.00
Sample key_worker n Prop
EDGI No key worker 42 0.65
EDGI Key worker 23 0.35
GLAD No key worker 6707 0.57
GLAD Key worker 4979 0.42
GLAD NA 37 0.00
NBR No key worker 8610 0.66
NBR Key worker 4399 0.34
NBR NA 20 0.00
RAMP No key worker 5500 0.67
RAMP Key worker 2609 0.32
RAMP NA 44 0.01

Cross tables

key_worker n_EDGI n_GLAD n_NBR n_RAMP Prop_EDGI Prop_GLAD Prop_NBR Prop_RAMP
No key worker 42 6707 8610 5500 0.65 0.57 0.66 0.67
Key worker 23 4979 4399 2609 0.35 0.42 0.34 0.32
NA NA 37 20 44 NA 0.00 0.00 0.01
key_worker EDGI GLAD NBR RAMP
No key worker 42 6707 8610 5500
Key worker 23 4979 4399 2609
NA 0 37 20 44

Chi square test

Warning in chisq.test(.): Chi-squared approximation may be incorrect
statistic p.value parameter method
318.4509 0 6 Pearson’s Chi-squared test

Bar plots

Warning: Ignoring unknown parameters: binwidth

Warning: Ignoring unknown parameters: binwidth